#ifndef __RS485_UART_H__
#define __RS485_UART_H__
#include<stdio.h>
#include<stdlib.h>
#include<unistd.h>
#include<sys/types.h>
#include<sys/stat.h>
#include<fcntl.h>
#include<termios.h>
#include<errno.h>
#include<string.h>
#include <signal.h>
#include <time.h>
#include <stdarg.h>
#include <pthread.h>
#include "queue.h"
#define HI_FALSE  	-1
#define HI_TRUE     0
#define SIZE 64

#define debugprintf
#ifdef debugprintf
    #define debugpri(mesg, args...) fprintf(stderr, "[HI Serial print:%s:%d:] " mesg "\n", __FILE__, __LINE__, ##args)
#else
	#define debugpri(mesg, args...)
#endif
int HI_Serial_Init(int fd, int speed,int flow_ctrl,int databits,int stopbits,int parity);
int HI_Serial_Open(char* HiSerDevice);
int HI_Serial_Set(int fd,int speed,int flow_ctrl,int databits,int stopbits,int parity);
int HI_Serial_Send(int fd, char *send_buf,int data_len);
int HI_Get_Serial_Name(int abs_fd, char* file_name, int cnt);
int HI_Serial_Recv(int fd, unsigned char *rcv_buf,int data_len);
void HI_Serial_Close(int fd);
void rs485_uart_init();
void rs485_uart_send(char *sendbuf,int len);
#endif